#SPDB_Informix_DBSPI_1003
# critical =0  正常 =1 
# "0" : 
# "1" : 正常
HANG=0
SPDB_Informix_DBSPI_1003="1"
su - $sys_user -c "$Souce_File dbaccess sysmaster" <<! &
!
sleep 5
case {{fan}}uname{{fan}} in
"AIX")
ps -T $$ | grep dbaccess
HANG=$?
if [ $HANG -eq 0 ]
    then
 ps -T $$ | grep dbaccess |  awk '{print "kill -9 " $1}' | sh
fi
;;
"Linux")
pstree -p $$ | grep dbaccess 
HANG=$?
if [ $HANG -eq 0 ]
    then
 pstree -p $$ | grep dbaccess | awk -F "[()]" '{print "kill -9 " $2}' | sh
fi
;;
*)
ps -ef | grep "dbaccess sysmaster" | grep -v grep
HANG=$?
if [ $HANG -eq 0 ]
    then
 ps -ef | grep "dbaccess sysmaster" | grep -v grep | awk '{print "kill -9 " $1}' | sh
fi
;;
esac
if [ $HANG -eq 0 ]
then
echo "Sysmaster database is not accessible"
SPDB_Informix_DBSPI_1003="0"
fi

echo SPDB_Informix_DBSPI---"$SPDB_Informix_DBSPI_1003" 